<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	
		
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
	<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<base href="<%=basePath%>">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
	<style type="text/css">
		body, html {width: 100%;height: 100%;margin:0;font-family:"微软雅黑";font-family:"微软雅黑";}
		#allmap{width:100%;height:500px;}
		p{margin-left:5px; font-size:14px;}
	</style>
		<title>校园管理</title>
		 <%@ include file="../com.jsp"%>
			<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=RxUvjAAMSbD6hH8EHqLs2ZBskuSPht2T">
		</script>
	</head>
	<body>
		<div class="alert alert-info">
			添加维修记录
		</div>
		<p>添加点击地图监听事件，点击地图具体位置后获取当前经纬度</p>
		<div id="allmap"></div>
		<form action="biotech_save.action" method="post"
			enctype="multipart/form-data">
			<table
				class="table table-striped table-bordered table-condensed">
				<thead>
					<tr>
						<td colspan="4">
							<b>添加维修记录 </b>
						</td>
					</tr>
				</thead>
				
				<tbody>
				<div class="form-group row">
												<label class="col-md-3 col-form-label">发布人</label>
												<div class="col-md-9">
													<input name="biotech.author" value="${user.username }" readOnly="true" />
												</div>
				</div>
			<div class="form-group row">
												<label class="col-md-3 col-form-label">订单标题</label>
												<div class="col-md-9">
													<input name="biotech.title" value="${biotech.title }" type="text" />
												</div>
				</div>
					
						<div class="form-group row">
												<label class="col-md-3 col-form-label">联系电话</label>
												<div class="col-md-9">
													<input name="biotech.phone" value="${biotech.phone}" type="text" />
												</div>
				</div>
				
					<div class="form-group row">
												<label class="col-md-3 col-form-label">具体位置</label>
												<div class="col-md-9">
												<input name="biotech.address" value="${biotech.address}" type="text" />
												</div>
				</div>
				
					<div class="form-group row">
												<label class="col-md-3 col-form-label">要求时间</label>
												<div class="col-md-9">
														<input name="biotech.needtime" value="${biotech.needtime }" type="text" />
												</div>
				</div>
				
				
					<div class="form-group row">
												<label class="col-md-3 col-form-label">地图位置</label>
												<div class="col-md-9">
															<input id="zuobiao" name="biotech.zuobiao" value="${biotech.zuobiao }" readOnly="true"/>
												</div>
				</div>
				
				
					<div class="form-group row">
												<label class="col-md-3 col-form-label">评价</label>
												<div class="col-md-9">
														<input id="pingjia" name="biotech.pingjia" value="${biotech.pingjia }" type="text"/>
												</div>
				</div>
				
				
					<div class="form-group row">
												<label class="col-md-3 col-form-label">维修类型</label>
												<div class="col-md-9">
														<select name="biotech.type">
										<option
											<c:if test="${biotech.type == '公共设施' }">
																	selected
																	</c:if>
											value="公共设施">
											   公共设施
										</option>
										<option
											<c:if test="${biotech.type == '网络维修' }">
																	selected
																	</c:if>
											value="网络维修">
											 网络维修
										</option>
										<option
											<c:if test="${biotech.type == '水电设施' }">
																	selected
																	</c:if>
											value="水电设施">
											  水电设施
										</option>
										<option
											<c:if test="${biotech.type == '环境卫生' }">
																	selected
																	</c:if>
											value="环境卫生">
											  环境卫生
										</option>
										<option
											<c:if test="${biotech.type == '其他' }">
																	selected
																	</c:if>
											value="其他">
											  其他
										</option>
							</select>
												</div>
				</div>
				
				<div class="form-group row">
												<label class="col-md-3 col-form-label">图片上传</label>
												<div class="col-md-9">
													<input name="biotech.file" type="file" />
												</div>
				</div>
				
					
				</tbody>
				<tfoot>
					<tr>
						<td colspan="4">
								<input class="btn btn-inverse" id="find" type="submit"
									value="保存" />
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<input class="btn btn-inverse" type="reset" value="取消" />
						</td>
					</tr>
				</tfoot>
			</table>
		</form>
	</body>
</html>
<script type="text/javascript">
	// 百度地图API功能
	var map = new BMap.Map("allmap");
	//河南大学
	//map.centerAndZoom(new BMap.Point(114.316467, 34.82315), 16);
	//郑州大学
	map.centerAndZoom(new BMap.Point(113.669148, 34.788102), 16);
	map.enableScrollWheelZoom(true);
	function showInfo(e){
	var a = e.point.lng + ", " + e.point.lat;
		document.all.zuobiao.value = a;
	}
	map.addEventListener("click", showInfo);
</script>
